package com.duowei.diandan.preference;

import android.content.Context;
import android.support.v7.preference.Preference;
import android.util.AttributeSet;

import com.jaredrummler.android.colorpicker.ColorPreference;

public class VisibleColorPreference extends ColorPreference {

    public VisibleColorPreference(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void onDependencyChanged(Preference dependency, boolean disableDependent) {
        super.onDependencyChanged(dependency, disableDependent);
        setVisible(!disableDependent);
    }
}
